<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="net.programmierecke.radiodroid2">

    <uses-feature android:name="android.hardware.touchscreen"
        android:required="false" />
    <uses-feature android:name="android.software.leanback"
        android:required="false" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="com.android.providers.tv.permission.WRITE_EPG_DATA" />

    <uses-sdk tools:overrideLibrary="androidx.tvprovider"/>

    <application
        android:banner="@mipmap/ic_banner"
        android:name=".RadioDroidApp"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:label="@string/app_name"
        android:theme="@style/MyMaterialTheme"
        android:requestLegacyExternalStorage="true"
        android:networkSecurityConfig="@xml/network_security_config">
        <provider
            android:authorities="net.programmierecke.radiodroid2.fileprovider"
            android:name="androidx.core.content.FileProvider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths" />
        </provider>

        <activity
            android:name=".ActivityMain"
            android:label="@string/app_name"
            android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
            </intent-filter>

            <!-- Use this intent filter to get voice searches, like "Play The Beatles" -->
            <!--<intent-filter>-->
                <!--<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />-->
                <!--<category android:name="android.intent.category.DEFAULT" />-->
            <!--</intent-filter>-->
        </activity>
        <service
            android:name="net.programmierecke.radiodroid2.service.PlayerService"
            android:permission="android.permission.BIND_JOB_SERVICE">
            <intent-filter>
                <action android:name="android.intent.action.MEDIA_BUTTON" />
            </intent-filter>
        </service>

<!--        <service-->
<!--            android:name="net.programmierecke.radiodroid2.service.RadioDroidBrowserService"-->
<!--            android:exported="true"-->
<!--            tools:ignore="ExportedService">-->
<!--            <intent-filter>-->
<!--                <action android:name="android.media.browse.MediaBrowserService" />-->
<!--            </intent-filter>-->
<!--        </service>-->

        <receiver
            android:name="net.programmierecke.radiodroid2.alarm.AlarmReceiver"
            android:enabled="true">
            <intent-filter>
                <action android:name=".AlarmReceiver" />
            </intent-filter>
        </receiver>

        <receiver android:name="androidx.media.session.MediaButtonReceiver">
            <intent-filter>
                <action android:name="android.intent.action.MEDIA_BUTTON" />
            </intent-filter>
        </receiver>

        <receiver
            android:name="net.programmierecke.radiodroid2.BootReceiver"
            android:enabled="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <!--<meta-data-->
            <!--android:name="com.google.android.gms.car.application"-->
            <!--android:resource="@xml/automotive_app_desc" />-->

        <!--<meta-data-->
            <!--android:name="com.google.android.gms.car.notification.SmallIcon"-->
            <!--android:resource="@mipmap/ic_launcher" />-->

    </application>
</manifest>
